package struct.login.ui
{
	import com.common.buttons.Button;
	import com.common.displayObjects.ComponentChildren;
	
	import flash.display.BitmapData;
	import flash.display.Graphics;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	import flash.text.TextFormat;
	
	import mx.core.ButtonAsset;
	
	import utils.Util;
	
	public class LoginUI extends ComponentChildren
	{
		public function LoginUI()
		{
			super(Main.application.width, Main.application.height);
		}
		
		public var txtName:TextField;
		public var btnStart:Button;
		public var btnHelp:Button;
		public var btnHttp:Button;
		override protected function createChildren():void
		{
			super.createChildren();
			var bmd:BitmapData = Util.getBitmapData("loginBg");
			var g:Graphics = graphics;
			g.beginBitmapFill(bmd);
			g.drawRect(0, 0, bmd.width, bmd.height);
			g.endFill();
			
			txtName = new TextField();
			txtName.x = 290;
			txtName.y = 350;
			txtName.width = 180;
			txtName.height = 30;
			txtName.background = true;
			txtName.wordWrap = true
			txtName.backgroundColor = 0xffffff;
			txtName.type = TextFieldType.INPUT;
			txtName.autoSize = TextFieldAutoSize.LEFT;
			txtName.defaultTextFormat = new TextFormat("黑体", 30, 0x00, false);
			addChild(txtName);
			
			btnStart = new Button("开始");
			btnStart.x = 190;
			btnStart.y = 440;
			addChild(btnStart);
			
			btnHelp = new Button('帮助');
			btnHelp.x = 300;
			btnHelp.y = 440;
			addChild(btnHelp);
			
			btnHttp = new Button('官网');
			btnHttp.x = 410;
			btnHttp.y = 440;
			addChild(btnHttp);
			
		}
		
		override public function dispose():void
		{
			 super.dispose();
			 
		}
	}
}